﻿@model TeamOPSchoolCup.Domain.POCO.Region

@{
    ViewBag.Title = "Edit";
}

@section region{
    <link rel="Stylesheet" href="@Url.Content("~/Content/css/Region.css")" type="text/css" />
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset id="addRegion">
            <legend>Edit Region</legend>
            @Html.HiddenFor(model => model.RegionId)
            <div>
                <div class="label">
                    @Html.LabelFor(model => model.Name):   
                </div>
                <div class="editor-field">             
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </div>
            @Html.HiddenFor(model => model.DateJoined)
            <div>
                <div class="label">
                    @Html.LabelFor(model => model.ParentId, "Parent"): 
                </div>
                <div class="editor-field">              
                    @Html.DropDownList("ParentId", String.Empty)
                    @Html.ValidationMessageFor(model => model.ParentId)
                </div>
            </div>
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>
}

<div id="btl">
    @Html.ActionLink("Back to List", "Index")
</div>
